﻿@model List<DataModel.Models.DepartmentModel>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<link href="@Url.Content("~/Content/university-structure.css")" rel="stylesheet" type="text/css" />


	<script>
	    $(document).ready(function () {
	        $('.department').click(function () {
	            $(this).children('.specialities').slideToggle('slow');
	        });
	    });
	</script>

<h2>UniversityStructure</h2>

<div class="departments">
    <h3>Departments</h3>
    @foreach (var department in Model)
    {
        <div class="department">
            <h3>@department.FullName</h3>
            <p>
                @department.Description
            </p>
                <div class="specialities">
                <h3>Specialities</h3>
                @foreach (var speciality in department.Specialities)
                {
                    <div class="speciality">
                        @speciality.FullName
                        <p>
                            @speciality.Description
                        </p>
                    </div>
                }
                </div>
        </div>
    }
</div>